package net.lainiao.morethread.Chapter1.demo4;

import java.util.ArrayDeque;
import java.util.Deque;

/**
 * Created by Administrator on 2017/2/27.
 */
public class Main {
    public static void main(String[] args) {
        Deque<Event> deque=new ArrayDeque<>();
        WriterTask writerTask=new WriterTask(deque);
        for (int i = 0; i <3 ; i++) {
            Thread thread=new Thread(writerTask);
            thread.start();
        }
        CleanerTask cleanerTask=new CleanerTask(deque);
        cleanerTask.start();
    }
}
